package com.jinloes.webfit;

import com.jinloes.webfit.persistence.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

import java.security.PublicKey;

public class MockDataStubber {

    @Autowired
    @Qualifier("userDao")
    public UserDao userDao;

    public MockDataStubber() {


        //userDao.setSessionFactory();

        User user = new User();
        user.setUsername("test");
        user.setPassword("1234");
        user.setRole(User.Role.USER);
        userDao.saveUser(user);

        user = new User();
        user.setUsername("test2");
        user.setPassword("1234");
        user.setRole(User.Role.USER);
        userDao.saveUser(user);

        user = new User();
        user.setUsername("test3");
        user.setPassword("1234");
        user.setRole(User.Role.USER);
        userDao.saveUser(user);

    }
}
